import 'package:flutter_house_manager/constants/index.dart';
import 'package:flutter_house_manager/utils/RequestDio.dart';

// 1. 获取验证码
Future<dynamic> sendCodeAPI(Map<String, String> params) =>
    dioRequest.get(HTTP_PATH.SEND_CODE, params: params);

// 2. 登录
Future<dynamic> loginAPI(Map<String, dynamic> data) =>
    dioRequest.post(HTTP_PATH.LOGIN, data: data);

// 3. 获取用户
Future<dynamic> getUserInfoAPI() => dioRequest.get(HTTP_PATH.USER_INFO);

// 4. 修改用户信息
Future<dynamic> updateUserInfoAPI(data) =>
    dioRequest.put(HTTP_PATH.USER_INFO, data: data);

// 5. 上传图片
Future<dynamic> uploadPhotoAPI(data) =>
    dioRequest.upload(HTTP_PATH.UPLOAD, data: data);
